#!/usr/bin/perl
#
#
while($line=<STDIN>) {
	chomp($line);
	if($line=~/^\t(gnp|tense|det): (.*)$/) {
		print "\t$1:$2";
	}
	elsif($line=~/^#([0-9]+) (.*)/) {
		print "\n$2";
		print STDERR $line."\n";
	}
	elsif($line=~/^([0-9]+)$/) {
		print "\n".$line;
		print STDERR $line."\n";
	}
	elsif($line=~/^\t(pos|root): (.*)$/) {
		print "\_$2";	
		print STDERR $line."\n";
	}
	elsif($line=~/^\s*$/) {
		print "\n";
		print STDERR $line."\n";
	}
	else {
		print STDERR $line."\n";
	}
}
